#ifndef _BCESDK_STRU_H
#define _BCESDK_STRU_H
#include <windows.h>
#include "BCESDK_Macro.h"

/*
enum{
	CALL_INCOMING,
	CALL_OUTGOING,
	CALL_MISS,
};
*/
#define CALL_INCOMING	0
#define CALL_OUTGOING	1
#define CALL_MISS		2

typedef struct _bcesdk_opp_person 
{
	TCHAR			name[PERSON_INFO_LENGTH];			// 0.Name
	TCHAR			Defultphone[PERSON_INFO_LENGTH];			// 1.Default number :0
	TCHAR			Cellphone[PERSON_INFO_LENGTH];			// 1.Cellphone number :1
	TCHAR			Officephone[PERSON_INFO_LENGTH];			// 2.Office phone number: 2
	TCHAR			Homephone[PERSON_INFO_LENGTH];			// 3.Home phone number :3
	TCHAR			fax[PERSON_INFO_LENGTH];			// 4.fax
	TCHAR			email[PERSON_INFO_LENGTH];			// 5.E_mail
	TCHAR			personAddress[PERSON_INFO_LENGTH];	// 6.Person Address
	TCHAR			companyAddr[PERSON_INFO_LENGTH];	// 7.Company Address 
	TCHAR			website[PERSON_INFO_LENGTH];		// 8.Web site
	TCHAR			remark[PERSON_INFO_LENGTH];			// 9.Some remark
}BCESDK_OPPPerson , *PBCESDK_OPPPerson;

typedef struct _bcesdk_phoneinfo 
{
	wchar_t szManufature[BCESDK_PHONE_NAME_LENGTH];
	wchar_t szModel[BCESDK_PHONE_NAME_LENGTH];
}BCESDK_PhoneInfo , *PBCESDK_PhoneInfo ;

typedef struct _bcesdk_RemoteServiceAttrStru
{
	short	svc_class;							    /* For Compatibility */
	wchar_t	svc_name[BCESDK_SERVICENAME_MAXLENGTH];	/*Service name in UTF-8*/
} BCESDK_RemoteServiceAttrStru, *PBCESDK_RemoteServiceAttrStru;

typedef struct _bcesdk_contactinfo
{
	wchar_t szName[BCESDK_CONTACT_NAME_LENGTH];
	wchar_t szHomeNumber[BCESDK_CONTACT_TELEPHONE_LENGTH];
	wchar_t szWorkNumber[BCESDK_CONTACT_TELEPHONE_LENGTH];
	wchar_t szCellNumber[BCESDK_CONTACT_TELEPHONE_LENGTH];
}BCESDK_ContactInfo, *PBCESDK_ContactInfo;
typedef struct _bcesdk_callloginfo
{
	int nType;
	wchar_t szName[BCESDK_CONTACT_NAME_LENGTH];
	wchar_t szNumber[BCESDK_CONTACT_TELEPHONE_LENGTH];
	wchar_t szTime[BCESDK_CONTACT_TIME_LENGTH];
}BCESDK_CalllogInfo, *PBCESDK_CalllogInfo;

typedef struct _bcesdk_smsinfo{
	int  index;										//the id of SMS in phone
	int	 type;										//the type of SMS in phone: SIM or ME
	int	 readState;									//the state of SMS:SMS_UNREAD or SMS_READ
	int  locked;									//Locked message could not be deleted
	int  position;                                  //SIM or Phone
	wchar_t szSmsBody[BCESDK_SMS_BODY_LENGTH];			//content of SMS
	wchar_t szSmsCallerID[BCESDK_CONTACT_TELEPHONE_LENGTH];	//phone number of caller
	wchar_t timeStamp[BCESDK_TIME_STAMP_LENGTH];			//time
	int wBoxNumber;									//state of box, 0:inbox, 1:outbox
}BCESDK_SMSInfo, *PBCESDK_SMSInfo;
typedef struct _bcesdk_DeviceInfoStru
{
	unsigned char bd_addr[BCESDK_BDADDR_LEN];		// BT address of the device
	wchar_t name[BCESDK_DEVNAME_LEN];	
}BCESDK_DeviceInfoStru, *PBCESDK_DeviceInfoStru;

typedef struct _bcesdk_Countryinfo 
{
	unsigned int  nCountryId;
	wchar_t szCountryEngName[COUNTRY_NAME_LEN];
}BCESDK_DunCountryInfo , *PBCESDK_DunCountryInfo ;

typedef struct _bcesdk_Providerinfo 
{
	int  nProviderID; 
	wchar_t szProviderEngName[PROVIDER_ENG_NAME_LEN];
}BCESDK_DunProviderInfo , *PBCESDK_DunProviderInfo ;

typedef struct _bcesdk_ShortcutInfoStru
{
	unsigned char bd_addr[BCESDK_BDADDR_LEN];		// BT address of the device
	wchar_t name[BCESDK_DEVNAME_LEN];	
}BCESDK_ShortcutInfoStru, *PBCESDK_ShortcutInfoStru;

typedef struct _bcesdk_hfp_status{
	int nStatus;		//HFP status
	wchar_t szPhoneNum[BCESDK_CONTACT_TELEPHONE_LENGTH];	//HFP num
}BCESDK_HFP_Status,*PBCESDK_HFP_Status;

typedef struct _bcesdk_FileItem
{
	unsigned long dwFileAttributes; 
	FILETIME ftLastWriteTime; 
	unsigned long nFileSizeLow; 
	wchar_t szFileName[MAX_PATH]; 
}BCESDK_FileItem, *PBCESDK_FileItem;

typedef struct  _bcesdk_filelist
{
	WIN32_FIND_DATA* pFileData;
}BCESDK_FileList,*PBCESDK_FileList;

typedef struct _bcesdk_CB_Stru
{
	int nType;
	int nFlag;
	BOOL bFlag;
	//phoneinfo
	BCESDK_PhoneInfo *pPhoneInfo;
	//contactinfo
	BCESDK_ContactInfo *pContactinfo;
	//CallLog
	BCESDK_CalllogInfo *pCalllog;
	//DeviceInfo
	BCESDK_DeviceInfoStru *pDeviceInfoStru;
	//HFP Status
	BCESDK_HFP_Status *pHFPStatus;
}BCESDK_CB_Stru,*PBCESDK_CB_Stru;

typedef void (BCESDK_CbkFunc)(BCESDK_CB_Stru *pCBStru);

typedef void (BCESDK_DeviceDiscovery_CbkFunc)(bool IsFinish, BCESDK_DeviceInfoStru pDevice_info);
typedef void (BCESDK_DeviceConnect_CbkFunc)(bool IsConnected,unsigned char* bd_addr, short svc_class);
typedef void (BCESDK_HandsFree_CbkFunc)(int nMsgId,void *pArg);
typedef void (BCESDK_DevicePair_CbkFunc)(bool IsPaired,unsigned char* bd_addr);
typedef void (BCESDK_PIMUpdateResult_CbFunc)(long errCode);
typedef void (BCESDK_PassThrCmdCbFunc)(unsigned char op_id, unsigned char state_flag);
typedef void (BCESDK_FTP_UIShowBrowseFile)(unsigned char* SYS_FIND_DATA);
typedef void (BCESDK_FTP_STATUS_INFO_CB)(unsigned char first, unsigned char last, wchar_t* filename, unsigned long filesize, unsigned long cursize);

#endif